package auth

import (
	"galaxy-manage/internal/repository/mysql"
	"galaxy-manage/internal/repository/redis"
	"galaxy-manage/internal/services/user"
	"go.uber.org/zap"
)

var _ Service = (*service)(nil)

type Service interface {
	i()
	GetCaptchaResult() *CaptchaResult
	Login(username string, password string) *LoginResult
}

type service struct {
	db          mysql.Repo
	cache       redis.Repo
	logger      *zap.Logger
	userService user.Service
}

func New(db mysql.Repo, cache redis.Repo) Service {
	return &service{
		db:          db,
		cache:       cache,
		userService: user.New(db, cache),
	}
}

func (s *service) i() {}
